﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

namespace Fitment
{
    public partial class Site1 : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string userName = Session["userName"].ToString();   //用于获取用户登录身份
            this.user.Text = userName;
        }

        protected void LogoutLinkButton_Click(object sender, EventArgs e)
        {
            FormsAuthentication.SignOut();  //登出页面并释放所有session
            Session.Abandon();
            Response.Redirect("~/logon.aspx");       
        }

       
    }
}
